<template>
  <div>
    <el-row>
      <el-col :span="15">
        <el-button type="primary" @click="examine">查询</el-button>
      </el-col>
    </el-row>

    <el-table
      :data="tableData"
      border
      style="width: 100%; margin: 20px 0"
      max-height="900"
    >
      <el-table-column prop="create_time" label="创建日期" width="200"></el-table-column>
      <el-table-column prop="api_name" label="接口名称" width="200"></el-table-column>
      <el-table-column prop="apis_id" label="接口id" width="200"></el-table-column>
      <el-table-column prop="asserts_expression" label="断言表达式" width="200"></el-table-column>
      <el-table-column prop="asserts_result" label="断言结果" width="200" :show-overflow-tooltip="true"></el-table-column>
      <el-table-column prop="depend_replace" label="依赖表达式" width="200" :show-overflow-tooltip="true"></el-table-column>
      <el-table-column prop="headers" label="信息头" width="200" :show-overflow-tooltip="true"></el-table-column>

      <el-table-column prop="ip" label="ip地址" width="200"
                       :show-overflow-tooltip="true"></el-table-column>
      <el-table-column prop="path" label="接口路径" width="200" :show-overflow-tooltip="true"></el-table-column>
      <el-table-column prop="request_method" label="请求方式" width="200"></el-table-column>
      <el-table-column prop="request_parameter" label="请求参数" width="200"
                       :show-overflow-tooltip="true"></el-table-column>
      <el-table-column prop="scene_id" label="场景id" width="200"></el-table-column>
      <el-table-column prop="scene_name" label="场景名称" width="200"
                       :show-overflow-tooltip="true"></el-table-column>


    </el-table>
  </div>
</template>

<script>
  export default {
    name: "Config",
    methods: {
      examine() {
        this.$xin.post(this.http + "/v1/apis/examine_script_log").then(res => {
          this.tableData = res.data;
          this.$message({
            message: '查询成功',
            type: 'success'
          });
        }).catch(err => {
          this.$message.error('参数错误');
        })
      },
      //页面刷新
      refresh() {
        this.$xin.post(this.http + "/v1/apis/examine_script_log").then(res => {
          this.tableData = res.data;
        })
      }
    },

    data() {
      return {
        http: this.config.ip,
        tableData: [],
        formLabelWidth: '120px',
      }
    },
    mounted() {
      this.refresh();
    }


  }
</script>

<style scoped>

</style>
